/*
 *
 *  Copyright (C) 2012-2024
 *  All rights reserved, Designed By 杭州连线客信息技术有限公司
 *  注意：
 *  本软件为杭州连线客信息技术有限公司开发研制，未经购买不得使用
 *  购买后可获得全部源代码（禁止转卖、分享、上传到码云、github等开源平台）
 *  一经发现盗用、分享等行为，将追究法律责任，后果自负
 *
 */

package com.lxk.oms.postorder.flow.refund;

import com.lxk.oms.order.domain.vo.OmsOrderVo;
import com.lxk.oms.postorder.domain.vo.OmsPostOrderItemVo;
import com.lxk.oms.postorder.domain.vo.OmsPostOrderVo;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.domain.FlowBaseContext;
import org.dromara.common.core.enums.UserType;
import org.dromara.common.core.validate.ContextGroup;

import java.util.List;

/**
 * 仅退款上下文
 *
 * @author heyi
 * 2024/9/29
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class PostOrderRefundContext extends FlowBaseContext {

    /**
     * 售后订单编号
     */
    @NotBlank(groups = ContextGroup.class)
    private String postOrderNo;

    /**
     * 用户ID
     */
    @NotNull(groups = ContextGroup.class)
    private Long userId;

    /**
     * 用户类型
     */
    private String userType = UserType.APP_USER.getUserType();

    /**
     * 售后订单
     */
    @NotNull(groups = ContextGroup.class)
    private OmsPostOrderVo postOrder;


    @NotNull(groups = ContextGroup.class)
    private List<OmsPostOrderItemVo> omsPostOrderItemVos;

    /**
     * 原订单
     */
    @NotNull(groups = ContextGroup.class)
    private OmsOrderVo order;

    private RefundResult result = new RefundResult(false);

    @AllArgsConstructor
    @Data
    public static class RefundResult {

        /**
         * 成功
         */
        private Boolean success;
    }


}

